type LengthOfString<
  S extends string,
  L extends any[] = []
> = S extends `${infer F}${infer Rest}`
  ? F extends ""
    ? L["length"]
    : LengthOfString<Rest, [F, ...L]>
  : L["length"];

type Len = LengthOfString<"kumiko">;
